﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="AddSiteColumnToContentTypeInfo.cs" company="Collaboris Ltd.">
//   Copyright (c) Collaboris Ltd. All rights Reserved.
// </copyright>
// <summary>
//   Defines the AddSiteColumnToContentTypeInfo.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Collaboris.Saf.Actions.Wss.Entities
{
    using System;

    using SharePoint.Wss.Attributes;
    using SharePoint.Wss.Entities;

    [CollaborisClass(
     Title = "Add Site Column To Content Type Info",
     ReleaseStatus = ReleaseStatus.Beta,
     DisableDocumentation = false,
     ContactAuthorEmail = "Support@Collaboris.co.uk",
     Summary = "Defines the parameters to add an existing site column to an existing content type."
    )]
    [Serializable]
    public class AddSiteColumnToContentTypeInfo : WSSEntityBase
    {
        #region Constants and Fields

        /// <summary>
        /// Site column name.
        /// </summary>
        private string fieldName;

        /// <summary>
        /// ContentType name.
        /// </summary>
        private string contentTypeName;

        #endregion

        #region Properties

        [CollaborisProperty(
             Summary = "Specifies the name of the site field (column) to add to the content type.",
             Title = "Field Name",
             Example = @"OrderDate",
             Required = true,
             InputHint = InputHint.SingleText
        )]
        public string FieldName
        {
            get
            {
                return this.fieldName;
            }

            set
            {
                this.fieldName = value;
            }
        }

        [CollaborisProperty(
                     Summary = "Specifies the name of the content type.",
                     Title = "Content Type Name",
                     Example = @"Order",
                     Required = true,
                     InputHint = InputHint.SingleText
        )]
        public string ContentTypeName
        {
            get
            {
                return this.contentTypeName;
            }

            set
            {
                this.contentTypeName = value;
            }
        }

        #endregion
    }
}